package com.powerunion.datacollection.workflow.fsm.state.task;

import com.powerunion.datacollection.workflow.fsm.FMName;
import com.powerunion.datacollection.workflow.fsm.WFTask;
import com.powerunion.datacollection.workflow.fsm.core.task.WFTaskContext;

public class WFTaskRunningState extends WFTask {

	public void abort() {
		throw new RuntimeException("处于running状态，不能执行abort()");
	}

	public void complete() {
		this.context.setCurrentState(WFTaskContext.completeState);	
	}

	public String getStateName() {
		return FMName.wk_task_state_name_run;
	}

	public int getStateNum() {
		return FMName.wk_task_state_num_run;
	}

	public void resume() {
		throw new RuntimeException("处于running状态，不能执行resume()");
	}

	public void run() { 
		
		
	}

	public void suspend() {
		this.context.setCurrentState(WFTaskContext.suspendState);
		
	}

	public void terminate() {
		this.context.setCurrentState(WFTaskContext.terminateState);
		
	}

	public void updateSubState() {
		throw new RuntimeException("此版本暂时不实现该功能！");
		
	}}
